home *** CD-ROM | disk | FTP | other *** search
/ Loadstar 247 / 247.d81 / t.ml move < prev    next >
Text File  |  2022-08-26  |  5KB  |  185 lines

  1. u
  2.             M L   M O V E
  3.      by Dave Moorman & Jeff Jones
  4.  
  5.  
  6.     Memory Management! This is one of
  7. the great logic puzzles that must be
  8. solved if you are going to do anything
  9. more complex than a purely BASIC or
  10. DotBASIC program. If you plan to use
  11. bitmap graphics, custom fonts, and ML
  12. routines or modules, you must figure
  13. out where everything goes.
  14.  
  15.     One difficulty is that ML routines
  16. are not relocatable -- for the most
  17. part. That means they must be bloaded
  18. to the memory location where they will
  19. work. But what if you have already
  20. assigned that memory to another item?
  21. What then?
  22.  
  23.     In the olden days, LOADSTAR
  24. published numerous versions of ML
  25. modules -- $C000, $C800, $9000, $9800,
  26. etc. The theory was that one of the
  27. many would work for your particular
  28. situation. The concept was fine -- but
  29. not perfect. Not only was it quite
  30. possible that none were what you
  31. really needed -- but valuable LOADSTAR
  32. disk space was being spent on what was
  33. essentially the same thing.
  34.  
  35.     Then, Jeff Jones came up with the
  36. answer: ML MOVER. Here was a small ML
  37. routine which could take [two]
  38. versions of the same ML code (each
  39. assembled to different memory
  40. locations) and create a third version
  41. at yet another location.
  42.  
  43.     Fender was tickled with the
  44. utility. He could have Toolbox at
  45. $8000 if needed -- but simply
  46. processing two Toolbox files at two
  47. other locations. And, now he had to
  48. publish only two assemblies -- and
  49. tell programmers to use ML MOVER to do
  50. their own conversions.
  51.  
  52.     Which we did. The only problem is
  53. that Jeff's code was -- and still is
  54. -- raw ML. You could bload it with a
  55. simple
  56.  
  57.     LOAD"ML MOVER",8,1
  58.                  and
  59.     NEW
  60.  
  61. But then you were faced with a rather
  62. long immediate mode command line:
  63.  
  64.  sys49152,"f1",dv,loc,"f2",dv,"loc",
  65.  "f3",dv,loc <RETURN>
  66.  
  67. As you can see, if the files had much
  68. in the way of filenames, it was darned
  69. hard to get it all on one line. And
  70. your typing had to be perfect.
  71.  
  72.     Hey! We have computers to do all
  73. that drudgery for us, right? Why
  74. didn't anyone think of this before?
  75. Probably because we were too busy
  76. working on some other project, and
  77. were just happy we could get that ML
  78. module where we wanted it.
  79.  
  80.     Enough for the clever patter. I
  81. have put together a DotBASIC program
  82. that lets you
  83.  
  84.     1. Get the two ML files, and
  85.     2. Make a third version.
  86.  
  87. The only thing you have to type is the
  88. new filename and the PAGE number where
  89. the file is going to go.
  90.  
  91.  
  92.  STEP BY STEP
  93.  ------------
  94.  
  95.     When you boot ML MOVE (note the
  96. slightly different name), you have
  97. four buttons you can click on.
  98.  
  99.  
  100.  DISK
  101.  
  102.     Here is where you choose which
  103. drive you will use for both source and
  104. target. If you try to change the drive
  105. after selecting files, the Make New
  106. will not work. So before you use ML
  107. MOVE, you will need to copy the two
  108. files to one disk (or disk image).
  109.  
  110.  
  111.  GET FILES
  112.  
  113.     This will present you with a
  114. multi-select scrolling directory menu.
  115. Use the mouse to click on the two ML
  116. files, then press <SPACE> to continue
  117. the process. You [must] choose [two]
  118. and only [two] files. If not, you will
  119. be asked to try again -- or not.
  120.  
  121.     The two file names are displayed
  122. for your confirmation. The program
  123. then examines the two files to
  124. determine if they are exactly the same
  125. length. I have no idea what happens if
  126. your try to use two different ML
  127. routines to make a third. It probably
  128. won't be pretty.
  129.  
  130.     If the examination is passed, you
  131. return to the main screen.
  132.  
  133.  
  134.  MAKE NEW ML
  135.  
  136.     If you have not selected two
  137. files, clicking this won't do anything
  138. except tell you it won't do anything.
  139. But if you have selected two files,
  140. they are listed, and you can input the
  141. name for the new file.
  142.  
  143.     This is followed by an input of
  144. the Page number for the new file. I
  145. know that many ML programmers like to
  146. use hexadecimal values, or ever actual
  147. decimal locations. But Pages are a lot
  148. easier to manage. As mentioned
  149. elsewhere, the Page number is the high
  150. byte of the bload address. It just
  151. makes everything much easier.
  152.  
  153.     Some favorite locations have easy
  154. to remember Page numbers:
  155.  
  156.     $8000 - 128
  157.     $9000 - 144
  158.     $A000 - 160
  159.     $C000 - 192
  160.     $D000 - 208 (not a bload address!)
  161.     $E000 - 224
  162.     $F000 - 240
  163.  
  164.     So with my own ML, I put the Page
  165. number in the file name: SCREEN158.ML,
  166. SCREEN192.ML, etc. It just makes sense
  167. to me. And since I am writing this for
  168. my uses mostly, the program asks for a
  169. Page number.
  170.  
  171.     If you enter a blank for either
  172. the new filename or the Page number,
  173. the program aborts back to the main
  174. screen. But if both are given -- in an
  175. instant or two, your new ML version
  176. has been written to your disk.
  177.  
  178.     That's about all there is to it.
  179. This is another program I have put on
  180. my Utility disk image, always ready on
  181. drive 9.
  182.  
  183.  DMM
  184.  
  185.  
  186.